package proxy.jdk2;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author ZhuQi
 * @ClassName Handel
 * @Date 2022/11/15 10:25
 * @Version 1.0
 * @Description TODO
 */
public class Handel implements InvocationHandler {

    private Object object;

    public Handel(Object object) {
        this.object = object;
    }


    /**
     * 一定要记住第一个参数没用
     *
     * @param o
     * @param method
     * @param objects
     * @return
     * @throws Throwable
     */
    @Override
    public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
        return method.invoke(object,objects);
    }
}
